<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="">
<head>
  <meta charset="UTF-8" />
  <title>注册</title>
  <link rel="stylesheet" th:href="@{/css/register.css}" />
</head>
<body>
<form method="post" action="/register">
  <h2>用户注册</h2>

  <label for="username">用户名：</label>
  <input type="text" id="username" name="username" placeholder="请输入用户名" required />

  <label for="password">密码：</label>
  <input type="password" id="password" name="password" placeholder="请输入密码" required />

  <button type="submit">注册</button>

  <p th:if="${error}" th:text="${error}" class="error-message"></p>

  <div class="link">
    <a href="/login">已有账号？去登录</a>
  </div>
</form>
</body>
</html>
